 // 获取上级
 export function findParents(data, targetId, parents = []) {
  for (let i = 0; i < data.length; i++) {
    const node = data[i];
    if (node.id === targetId) {
      return [...parents, node];
    }
    if (node.childrenList && node.childrenList.length > 0) {
      const result = findParents(node.childrenList, targetId, [...parents, node]);
      if (result) {
        return result;
      }
    }
  }
  return null;
}